package com.cscp.javastudy.juc.volatiledemo;

/**
 * 饿汉式单例
 * 浪费空间
 */
public class SingletonDemo1 {

    private SingletonDemo1(){}

    private static final SingletonDemo1 instance = new SingletonDemo1();

    public static SingletonDemo1 getInstance(){
        return instance;
    }

}
